#include <iostream>

#include "TinyThreadPool.h"

int main() {
    using tinyUtil::TinyThreadPool;
    TinyThreadPool threadPool(1);
    threadPool.run([]{
        std::cout << "Hello, world" << '\n';
    });
    threadPool.run([]{
        std::cout << "Hello, CPP" << '\n';
    });
    threadPool.run([]{
        std::cout << "Hello, Java" << '\n';
    });
    // wait for all work finished
    while (threadPool.getQueueSize()) {
        std::this_thread::yield();
    }
}
